Skip to content

staged-images: Add chunkah-staged bootc base image builds#152

Open
cgwalters wants to merge 1 commit intobootc-dev:mainfrom
cgwalters:chunkah-images
Open

staged-images: Add chunkah-staged bootc base image builds#152
cgwalters wants to merge 1 commit intobootc-dev:mainfrom
cgwalters:chunkah-images

Conversation

@cgwalters
Copy link
Copy Markdown
Contributor

Add infrastructure to build rechunked bootc base images using chunkah. These 'staged' images mirror upstream fedora-bootc and centos-bootc, strip /sysroot (ostree data), and rechunk with content-based layers for optimal layer reuse across updates.

Source images are pinned by @sha256 digest for reproducibility, with a Renovate custom regex manager to automatically bump digests when upstream tags are updated.

Target images:

  • ghcr.io/bootc-dev/fedora-bootc-staged:43
  • ghcr.io/bootc-dev/fedora-bootc-staged:44
  • ghcr.io/bootc-dev/centos-bootc-staged:stream10

Closes: #151

Assisted-by: OpenCode (Claude Opus 4)

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a workflow for rechunking bootc base images using the chunkah tool and updates the Renovate configuration to support container image digest pinning in YAML files. Feedback highlights several architectural concerns in the new Containerfile, including the use of non-portable Podman-specific features like oci-archive, the lack of reproducibility due to using the :latest tag for build tools, and a dependency on external, gitignored configuration files. Additionally, a more robust regex for the Renovate custom manager was suggested to better handle varied YAML syntax and optional parameters.

Right now we always build a "from scratch" image in bootc
to avoid the mtime issue for ostree. We may as well
have pre-cached images that do this.

Add infrastructure to build rechunked bootc base images using
chunkah.  These 'staged' images mirror upstream fedora-bootc and
centos-bootc, strip /sysroot (ostree data), and rechunk with
content-based layers for optimal layer reuse across updates.

The workflow has three phases:

  mirror  — skopeo copy --all from quay.io to GHCR so we own the
            copies and aren't broken when upstream deletes old
            manifests on tag re-push.

  build   — per-arch (amd64 + arm64) chunkah builds on native
            runners, pushed by digest.

  manifest — assemble per-arch digests into multi-arch manifest
             lists using bootc-dev/actions/create-manifest.

Source images are pinned by @sha256 digest for reproducibility,
with a Renovate custom regex manager to automatically bump digests
when upstream tags are updated.

Target images:
  - ghcr.io/bootc-dev/fedora-bootc-staged:43
  - ghcr.io/bootc-dev/fedora-bootc-staged:44
  - ghcr.io/bootc-dev/centos-bootc-staged:stream9
  - ghcr.io/bootc-dev/centos-bootc-staged:stream10

Closes: bootc-dev#151

Assisted-by: OpenCode (Claude Opus 4)
Signed-off-by: Colin Walters <walters@verbum.org>
set -euo pipefail
image="${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.name }}"
podman tag localhost/${{ matrix.name }}:latest "${image}:latest"
podman push --retry 3 --digestfile "${{ runner.temp }}/digestfile" "${image}:latest"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid fedora matrix jobs push collisions ( sometimes push at the same time, or push to same url one by one), unique tag like "${image}:${{ matrix.tag }}-${{ matrix.arch }}" would be better.


FROM ${CHUNKAH} AS chunkah
ARG MAX_LAYERS
RUN --mount=type=bind,target=/run/src,rw \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rw bind mount doesn't persist out.ociarchive back to the build context. I tried --mount=type=bind,source=.,target=/run/src,rw, it does not work too.

I can't figure out the solution inside Containerfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

generate chunkah-prep'd images here

2 participants